package com.llb666.shop.user.api.vo;

import com.llb666.shop.user.domain.entity.Users;
import lombok.Data;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

/**
 *
 * 用户Vo.
 *
 * @author llb666
 */
@Data
public class UsersVo {

    /**
     * 主键id 用户id
     */
    private String id;

    /**
     * 用户名 用户名
     */
    private String username;

    /**
     * 昵称 昵称
     */
    private String nickname;

    /**
     * 头像
     */
    private String face;

    /**
     * 性别 性别 1:男  0:女  2:保密
     */
    private Integer sex;

    /**
     * 用户会话token
     */
    private String userUniqueToken;

    /**
     * 用户会话refreshToken
     */
    private String userRefreshToken;

    @Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
    public interface Converter {

        UsersVo.Converter INSTANCE = Mappers.getMapper(UsersVo.Converter.class);

        UsersVo do2Vo(Users activity);
    }

}
